Generalize the functions