Added currentPage variable