changed expand-patterns to expand-patterns-maybe