fully working save and view