some changes in inverse_case function