refactoring site specific code