Added algoirthms 1 & 2