Made initial changes suggested by paul