Generalized code using integer_t