I think this is working but the evaluation functioins need attention
merged?