errors now take nodes as parameter and prints line number
test case now valid