purge entries properly