Modified the block recognition to better suit our needs