added options to order output

allows one to order output alphabetically or by length in ascending or
descending order