added json and html endpoints