small code for data mining