Created linked list append function