having issue with save function inside draw.html