added the image object and also fixed the timing issue