updated api changes to support promises