remove writes optimization