refactoring to provide a cleaner api
added async