Implement insertBefore