simplify endfunction
apply policy CMP0043