moved logic from restaurant view into restaurant helper