removed unncessary code, adapted sleeps