testing for ManytoMany function