update rand element