fixed bugs, added json generator script