monoids: implemented indexJ