add sorting back in