Having some trouble generating all the 1st gap