diff --git a/exercises/ex1/hello_world.f90 b/exercises/ex1/hello_world.f90
index 1ed5911..070bae6 100644
--- a/exercises/ex1/hello_world.f90
+++ b/exercises/ex1/hello_world.f90
@@ -1,27 +1,29 @@
 module helloWorld
   implicit none
 
 contains
 
   subroutine hello_world_cpu
     write(*,*) 'hello world from CPU code'
   end subroutine hello_world_cpu
 
 
   attributes(global) subroutine hello_world_cuda_threads
-    write(*,*) 'hello world from thread', threadIdx%x
+    integer :: tid
+    tid = threadIdx%x
+    write(*,*) 'hello world from thread', tid
   end subroutine hello_world_cuda_threads
 end module helloWorld
 
 program testHelloWorld
   use cudafor
   use helloWorld
 
   implicit none
 
   integer :: istat
 
   call hello_world_cpu
   call hello_world_cuda_threads<<<1, 1>>>
   istat = cudaDeviceSynchronize() 
 end program testHelloWorld