added state.from_dict