use sparql to get the pids
use sparql to get the pids
Fixed merge conflicts for state logging