added check on length of proof list