updated image code