add better sorting