updated event listener to use passed in scope instead of root scope.