generating sample data
classifying function