Added sleep call to main function