refactored to support all of the bulk API methods