updated for batch processing, utilities and analyses