add method to evaluate G matrix