Added functions for vertex and edge