Improved the ordering with a lambda expression