added test for -g switch