added some code to compute prototype confusion