add Pack Rat
simplify groovy code