changed media to has many through

Fixes #145