code before reformulating algebra