added program save and load functions, and main save-load test