just learning java threads and some exercises