got more database functionalities working