Gh 1081

this branch is tested and ready for merge!