Finding the middle element