select dec refactoring