script for generating patterns for users