changed return type of threads