added add_row fxn
added write the database
update
reduced what what's collected in database