added pages and json endpoints