generalized pattern