Gsdstr code tested and enhanced