make sure fscanf formats match number types
add some documentation