Adding insertLast method for linked list