incorporating Heiko changes
Merge pull request #4 from nraychaudhuri/clustering

incorporating Heiko changes