adapt analysis to Json-Dumps
add tests + refactoring