insert gaps into db