added d-imager module
improvements on clustering algorithm