association wrapper, sort, bug fixes