added tortoise and hare algorithm