return promise at function waitExecute instead of undefined