added functionality to view orders page