refactored wipe for cleaner use