switched to enum class for pattern