Added some comments. Algorithm is not complete yet