Marking sort function private