add customizable function for sort value extraction and param for case-insensitive