merge in Paul's code