correct the return type for anneal