making a struct to pass into the thread