Converted to use enum types instead of bytes