Added base logic for images