moved code that makes PAPI call to result a registration to it's own function