moved around some lower-case transformation code