Made pagination better