parse output
refactor class