making threads play together nicely