removed calls to String.isEmpty()