switch from sstream to oldschool fscanf