now using bulk writes to db