remove invalid entries part