update
add logging