fixed bug where number of lines was under 10 (also somewhat under 20)
removed redundant floor in m<20 case
Fixed bug in regex caused by switching to single quotes