initial code for conversion