part 2 of refactoring to a global site variable instead of passing it around