Working version with svg drawing