added indexed comonad class