preliminary database implementation