fixed bug in pingalls result calculation