added features to patternsearch