changes to how callback is used in api