handling callback on pages_controller