add some conversion and string check