simplified database stuff, work in progress