creating better usable JSON code