fixed bug: clear erases the lines array now