added the logic for resizing the pattern with the gaugeinformation;
added comments and translated german expressions