Update: Quick sort with function