made changes suggested by little penguin