changes suggested by Daniel Kruegler