added some sorting fns