more progress on working with the db