some work on pagination, not working yet/crashes