implementing efficient baryon tensor code