replaced callback with a return