Implement save data functionality