insert before instead of appendChild