Pushing elements to the end of the linked list