Didn't realize i had to pass an element into insertbefore.