Took algo package from java-projects