made functions sorter