implemented batch insertion