Added structure for algorithm