refactor code to account to sas framework changes