added automatically centering the image