maybe move this after the switch so we not convert an invalid address ?