Add generator for functions