Changes in helper to handle JSON