first task for promises is refactor.