refactoring vars on settings