A better implementation which automatically ignores the case-sensitive option