here's the start of the db stuff.