add last assignment
implement neighborsWithHistory with foldLeft
try to implement, not working