check that reassigning value for key works