public static List<AstronomicalObject> sortByName(List stm, int factor) {
        List<AstronomicalObject> sorted = stm;

        if (factor < 0) {
            Collections.sort(sorted, (B, A) -> NAME_COMPARATOR.compare(A, B));
            log.info("SortedByName descending :{}");
        }
        if (factor >= 0) {
            Collections.sort(sorted, NAME_COMPARATOR::compare);
            log.info("SortedByName ascending :{}");
        }
        return sorted;
    }