adding scope listener