making sort function static