Why do you include mid element in recursive call? I think it's obsolete here and in another branch.