add function to find middle element of singly linked list using one pointer only