Adding convert function.