added errors to semantics to demonstrate side-effects for ordering