update for many to many.
bug fixing.