fix data structure. Added ids