use Kaminari

change will_paginate to Kaminari