added load/save feature and tests