preliminary add of patternmodel (to be done mostly still)