duplicate function removal