changed pages_controller file to get the tables file