refactored networking/api callback structure