[FEATURE] added function for providing a custom compare method

__Tasks:__
- [ ] got feedback

__Informations:__

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | none
| Doc           | none

keep order