refactored same function.