implemented case-insensitive ranking