fixing header include in main and making sort call shorter