refactor external-size