restructure association views to get rid of redundant code