patter recognition