This is about right, but we need to always return a numeric code and convert it to a string when necessary