implemented greately improved version of Buchberger's algorithm using the syzygy theory.