added bool isFunction for distiguishing void functions from variables