Added basic block visitor function