finished backend of ajax call for consultant view/update