add gblocks trimming code