Add set element function.