added testing for db interface, still a lot to do...