correct file structure, added json function