initial implementaiton of specification pattern