test for useing promise