cv functions implemented and tested