Success rate

new code for mean success rate calculation