Added fenwick trees