refactor enum as an object 

gets frozen (if freeze is supported in browser--not supported in IE8)