change color and edge from struct to class