changed ui changes to return json object with data