refactoring3dec