applying gap generator