Using constant and generics