working on promise value and reason refactoring