sok refactor