How do you determine the smart contract state doesn't change ? I'm also not seeing where "client" is being setup, is it created outside of your function ? It's not passed as a parameter.