improved performance test - now works properly