add paginator.js
"add paginator.js and change file structure"

This reverts commit 5d15c04ba1b6565160f4d16fa4582ebd81028e60.