Both groups received a home-based intervention of moderate aerobic and resistance exercises , nutritional counseling with protein supplementation , and relaxation exercises initiated either 4 weeks before surgery ( prehabilitation ) or immediately after surgery ( rehabilitation ) , and continued for 8 weeks after surgery .