added pagination and modal windows