created abstract algo class, changed file structure