added flag -g