added models
added json endpoints