optimized save and delete