made all the changes suggested by Greg