1377 - Convert class to a function to ensure existance of lines