apply consistent use of promise API