analyzing patterns