fixing delete outdated, previous implementation was not working