passing arguments into threads