added callback features to API cals to trigger finishing up functions