made ListNode<T> a seperate class and added a last reference LinkedList