Standard algorithm implemented