added exit if line is nil