refactor of code to align with site module usage