documentation, infinite loop fixed to not be infinite