added a couple utility functions useful for batch operations