added mutex to tests