refactoring - 5c control structures