Added algo2