added sorting to package output