made image writer and got it working