add test function reading input from file
use struct instead of list for each node in table