initial theta distribution code