331: refactor