fixed some more stuff hopefully not too much in terms of using lines