added Assign method and test for it