refactoring for the further change for mantis issue 3340