basic sorting features implemented