Settled on an update state method - the module and example are working now