purpose in pain