Enum instead of generics