changed end case