updated main logic, added i18n