integrated theta distribution into the source code