reformatted print output + started implementing the "-g" switch