finally fixed sim anneal