use variable for recurring function call