Utility methods added for sorting vectors