Added insertion function