Many to many relation routine