patterson function works now, needs testing for saving and loading of configurations.