fixed recursive case