partially working pagination. removed for now