updates gap
corrects some gap related issues