Changed APIs to support multiple insertion and deletion