add pagination and sort by columns on files and messages