remove magic number 1

replace the magic number with a variable representing the first line
number