refactor sth