refactored
log