Added changes suggested by Gunnar