changes to write password