updated for inner page gap