added fenwick tree