switched to semigroup