fixed bugs, added conditional random primitive