refactoring handler and using job to launch asynchronously