fixing data structure