fix data structures