sort declarations