fixing difficaulty control
resolve conflict
some improvement in difficulty loop