Almost done. Added the algo