rudimentary saving implemented. Lots of bugs.