Interactions between pain and motor function