Flexible categorization in perceptual decision making