better way of appending children to DOM