Did some cgahges
Added pagination