added json saving/loading