added some sscanf checks