potentially a switch on type would be faster