change gets to fgets. add some examples to README2.