json lines refactored