doesn't seem to consistently do the right thing