refactor
log to prevent multiple invoke