removed withwait function