changed line class to behave correctly