reworked case handling