kept promise refactoring