Added capture_buildings function