minor mistakes and back to nan