replace fgets to my_gets