db functions for vertexes