solution to diagcgi