Changing to multi threads