updates to make several threads run at the same time