Enum generic solutin