added code to do clustering in python