set up has_many through associations and updated views