refactored to allow for witness point tracking