using randomservice in the code class