refactoring on site controller