Use the type of the enum instead of int