save functionality init