gap insert implementation