trying to solve the promis issue