implemented setMany() method