Update Algorithm.java