Added cpquery to construct_bn