urgent --> Irule with uri and available pool members is not acceptting due to syntax error

Hi All, I need a help in fixing the syntax in below irule.

when HTTP_REQUEST { if { [HTTP::uri] starts_with “/TEST” } { if { (active_members POOL-2 == 0) {

HTTP::respond 404

} else { HTTP::respond 200 } } } }

when HTTP_REQUEST {
    if { [HTTP::uri] starts_with "/TEST" } { 
        if { ([active_members POOL-2] == 0) } {
            HTTP::respond 404 
        } else { 
            HTTP::respond 200 
        } 
    }
}

worked..! Tq for the quick responce.