Test function changed

Now each thread randomly choise what it does