pattern diagram