refactor; ref #4