update to fix promises