added a feature to run loop threads with the number of the specified value.