added simple clustering