added action for json output to controller. if works without layout