setup reading password and writing password separately