updated to properly handle body as container