replaced some waitinststages by waitforneedle