Added initial work to the algorithm