changes
merged with paul's version