seems waitid takes 4 arguments