ifelse works with blocks