Reducing complexity of set_multi()