working save with interface, could use some cleaning up