V1.01 adding some comment and modified print function