make pagination a component