working code and files for SGAT development