                 player = Int(match.value)
             }
         }
-
-        var name: String?, zone: String?, cardId: String?, type: String?
         if entity.match(ParseEntityNameRegex) {
             if let match = entity.matches(ParseEntityNameRegex).first {
                 name = match.value

        var zone: String?
        var cardId: String?
        var type: String?
    }

    // parse an entity
    func parseEntity(entity: String) -> LogEntity {

        var id: Int?, zonePos: Int?, player: Int?
        if entity.match(ParseEntityIDRegex) {
            if let match = entity.matches(ParseEntityIDRegex).first {
                id = Int(match.value)

            }
        }

        return LogEntity(id: id, zonePos: zonePos, player: player,
                         name: name, zone: zone, cardId: cardId, type: type)
    }

    // check if the entity is a raw entity
    func isEntity(rawEntity: String) -> Bool {
        return parseEntity(entity: rawEntity).isValid()
    }

    func parseTag(tag: GameTag, rawValue: String) -> Int {
