started some code to handle the unbalanced cv simulations