refactored promises

trying to make code simpler and more readable
not sure I actually made it better!