implement convert()