refactored reused code.