dev code for cross validaiton