add checkScroll and getOffsetBox methods