added randomness to TeachingMaterial creation