use global variables of the given function