Create three function of sort