add database read and write
db changes