Weird rotation of hand in IK

Hi!
How can I let IK to rotate with my hands? Currently it could only change the upper bones with location changes instead of rotation of my hands
i mean if I flip my hands, the arm won’t adjust the rotation like this
Please help!
image