better handling of multiple cases