global refactoring #239