refactor stast class