check in of working version with some of the db stuff added