compound stat
ifelse fix