added warning for the methods that would possibly use all the memory and simplified the getLines method