remote api callback function