making some conversion code