should be a util method in suite, this code is repeated many times