added threading and main to file 3