added some logic for the svg