changed parameters to json callback