Switched to new algorithm