added simple thread waiting/join