finish following function: click to remove block, compress the map and full fill the map