use session insteand of global variable to store paginator