some replacing of innerhtml with proper commands