Used respond_to for sync_controller