change lval ref to rval ref. now the semantics is correct