created ISTAinstance struct and streamlined code