db write works for users