Added function for automated analysis