* minor code refactoring.