now deal with multiple cases