test for working with threads