added variable scope events back in