[code] refactor