New version (sleep until end of asignements)