removing common sort and putting it into arry utils