first version of user db functions