Added getCurPage() function