added pagination and editing capability