remove unused then var