added calculated values to rendered json in controller