update to stop using pasted state variable