renamed algorithm