People can use anxiety to motivate themselves, study finds