add sort to programs