added auto_correlate functionality