data deleted refactored