have a way to gen the functions