changed data structure
comment unused code