moved parse test function to helper