#6 refactoring to centralize conversion so that we have a place to put the substitutor