work on pagination, buggy so far