Made changes suggested by Doug