refactor prove helper