Groebner bases via the FGLM algorithm