added better loss detection to the greedy engine
fixed the config file