updated prime groovy