started writing a new algorithm