refactoring
+ paginate javascript ok