update router success function to take in data