slight refactor for sites controller