updated data structure, did some structural class definings