made marginalize method in clique