implemented pagination at the UI level,