udpating ref for dom