add new file pagination, edit database