Updating to Bill's latest code