moved some of the constraint checks into separate functions, added probability distribution updating and global satisfaction checking