need to write to db