added a number of lines argument to per.py