use fgets and accept spaces in words