updated initialize method to take vertices