sorting methods and imports