paginate method improve for basemodel class