change iteration count and add documentation