add async and batch insertion