allocated memory for vertex edges just once