Implemented sorting by a few attributes