removed get_pattern_spec as really uneccessary refactoring