detection of blocks + lines