pre-refactoring state of linear equivalence
linear equivalence pre-alfa, almost working