created function to store all identified patterns and outcomes in two arrays