rewrite parsing and amend printing to support more data