Specification pattern implementation dug out of some old code and separated