fix the paging bug and finish the configure function