changed function call to remote api