move tokenpager logic to standalone