avoid returning NaN as an answer, fix grammar in comments