Changed add method to insert at the end of the list