added a spec to test thread behaviour