improve class Page and Line