Fixed issue where i had used document.write and i cant use that