ints, matrices but bools trouble with dependent if then else