Reduced conditions on replace variable class