added output statement to anonymous thread