refactoring and semicolons