add Stephen's latest changes