simpler approach to batch writes