4 added json, refactoring