refactoring
+ paginate javascript ok (fix bug)