dash initialize method refactoring