Create algoritm v 1_1

This is the start of the algorithm code