added json and changed routes