added analytics and pagination