implemented and tested the updateSlicePassword function