The interaction between perceptual grouping and attention