Cross validation test implemented (error fixed)