added more functionality on documents pages