clustering.py implemented (to be improved)