added links and pagination