pass through the retcode from the state call