removing algebraic data types