Added function for drawing image