Adding diagram for selective querying algorithm