turn enum BEAM_MODE into enum class BeamMode