add db interface, ugly...