Updated the data converter to switch statement instead of innappropriately used if statements.