converting to groovy