add sort, exclude function