adds ntp-style algorithm