function block detection