updated init to support patternfiles