pass targets to calculate node errors