updated doAssign to check rhs expression rvs