set sorting function static