make the function to convert work