pagination logic done need to debug