renamed algorithm variables