improved enum naming and handling of invalid case