changed data structure - fixed issue with refactor