Updated controller to supply json