minimieren2D mostly done