added a simple way to create custom patterns on the fly