remove uneeded code from state function that was left only as a framework for the new state function but contained errors