added function to build cnn-dataset