improved my helloworld code with for loop