added generator for functions, also added some more commands