sorting of attributes now uses comparator interface