Added delete variable for soft deleted records