rewrite peverify resolution method

This should fix issue #31.