added CV code, but have not tested yet
Tested CV code.  No bugs found yet.