somewhat better version of last change