Added sleep method.