Implemented 'display by attribute' functionality using a more Object-oriented design and apprpach