element creation in js simplified