begining of sort