added sleep functionality to client