refactoring generator
small refactoring
add new functional with json, update kdb section in sync function