Update to convert function