fixed up code to use an enumeration instead of a set of const ints.