updated functions with promises and updated name