updated pinger algorithm