Added pagination functionality & Optimized get functionality