reformat condition
check for zeroes
log-zero-w