this logic is duplicate with the content of the convert() method line 64