divide main function and mine sleeper functions
now playing on browser is available