Added threading, now it outputs them all at once. &printf2