apply craken sort