refactored CPERunner so it's not so dumb