fix complexity and add locales