Refactoring, added default setting