Gh 825

tested and ready for merge.