added code to test threads and collections