math tweak + more comments

explanation for the randomness is in the report under section on