Modified the conversion function so that it matches iwth the others