rewrite of image manager