Implemented write batch API