refactored createElement
refactored htmlelement