refactor scheme 147