refactoring - 6f control structures