moved conversion into the main module