fixed gains, added state memory to prediction, added to parser plotting for prediction