Implemented insertBefore