wip database functionality