rearranged layout of the file. first add all functions, then add i18n code.