removed unnecessary variable firstLine