added json and modified pagination file