adding code for table and order view