CAC: A Clustering Based Framework for Classification