trying to get data from pivot table, fixed layout problems in views