implement smartcase detection