split pos_v0.2's printInventory into 3 function.
refactor pos_v0.2