removing gap_check to increase speed