new save_data signature - more flexible - more generic