added variable reference on rootscope