refactor site controller