this is needed, but should be made conditional: only sleep is output is empty