added initial methods for serializing patterns
rows can be addded
Merge branch 'save-patterns' into dev