refactor to support multiple key in one round