Finally working; documentation added; working on adding limits to iterations