finished structure learn as well as parameter learning