implementing operator.assign()