update comment
collapse if/else sequence into an expression