Duplicate functions are replaced with one polymorphic that works for any type