changing local conversion code to better match current system