refactor variables locales