implementing baryon tensor contractions