delete unnecessary rows