changed index layout, added pagination