change flow of promise