creating elements instead of innerhtml