Added finding middle element