refactoring: reference distance reduced
refactoring: initialization and configs