Can use enums as refs

fixes #5