Generalized the input